package com.study.services;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.study.model.jdao.ISupplierManDAO;
import com.study.model.mdao.SuppliermanMapper;
import com.study.model.pojo.Supplierman;

@Service
@Transactional(rollbackOn = Exception.class)
public class SupplierManService {
	@Autowired
	ISupplierManDAO dao;
	@Autowired
	SuppliermanMapper mapper;
	
	public Supplierman selectById(int supid) {
		return dao.findBySupid(supid);
	}
	
	/**
	 * 根据供应商id查询联系人
	 * @param id
	 * @return
	 */
	public List<JSONObject> selectBySupno(Integer id) {
		return mapper.findBySupno(id);
	}
}
